﻿<phone:PhoneApplicationPage 
    x:Class="SensorJanken.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="696"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="True">

    <!--LayoutRoot は、すべてのページ コンテンツが配置されるルート グリッドです-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel は、アプリケーション名とページ タイトルを格納します-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock x:Name="ApplicationTitle" Text="Wi-Fi センサー ジャンケンポン!" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock x:Name="PageTitle" Text="メインページ" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <!--ContentPanel - 追加コンテンツをここに入力します-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="100"/>
            </Grid.RowDefinitions>
            <Border BorderBrush="Aqua" Grid.Row="0" BorderThickness="2" Margin="4,4,4,4">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="80"/>
                        <RowDefinition Height="64"/>
                        <RowDefinition Height="64"/>
                        <RowDefinition Height="64"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="120"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Text="グループ設定" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Center" FontSize="48" Margin="8"/>
                    <TextBlock Text="名前" Grid.Column="0" Grid.Row="1" VerticalAlignment="Center" FontSize="20" Margin="8"/>
                    <TextBox Name="tbGroupName" Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" FontSize="20" Text="JangKenPong" />
                    <TextBlock Text="アドレス" Grid.Column="0" Grid.Row="2" VerticalAlignment="Center" FontSize="20" Margin="8"/>
                    <TextBox Name="tbGroupAddress" Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" Text="" FontSize="20"/>
                    <TextBlock Text="ポート" Grid.Column="0" Grid.Row="3" VerticalAlignment="Center" FontSize="20" Margin="8"/>
                    <TextBox Name="tbGroupPort" Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" FontSize="20"/>
                 </Grid>
            </Border>
            <Grid Grid.Row="0" Name="alertPanel" Opacity="0">
                <Grid.Background>
                    <SolidColorBrush Color="Black"/>
                </Grid.Background>
                <Grid.RowDefinitions>
                    <RowDefinition Height="220"/>
                    <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Name="tbAlert" Grid.Row="0" Grid.ColumnSpan="2" TextWrapping="Wrap" FontSize="24"/>
                <Button Name="buttonAlertOK" Grid.Column="0" Grid.Row="1" Content="はい" Click="buttonAlertOK_Click" />
                <Button Name="buttonAlertNG" Grid.Column="1" Grid.Row="1" Content="いいえ" Click="buttonAlertNG_Click" />
            </Grid>
            <Button x:Name="buttonJoinAndStart" Content="ジョイン ＆ スタート" Grid.Row="1" Click="buttonJoinAndStart_Click" />
         </Grid>
    </Grid>
 
    <!--ApplicationBar の使用法を示すサンプル コード-->
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True" Mode="Minimized">
            <shell:ApplicationBarIconButton x:Name="appBarButtonHelp" IconUri="/Images/help.png" Text="Help" Click="appBarButtonHelp_Click">
            </shell:ApplicationBarIconButton>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>
</phone:PhoneApplicationPage>